//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by FernFlower decompiler)
//

import java.sql.Connection;
import java.sql.DriverManager;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;

public class Main {
    public Main() {
    }

    public static void main(String[] args) {
        String url = "jdbc:mariadb://localhost:3306/mysql";
        String user = "root";
        String password = "147258";
        Connection conn = null;
        PreparedStatement pstmt = null;
        ResultSet rs = null;

        try {
            Class.forName("com.mysql.cj.jdbc.Driver");
            conn = DriverManager.getConnection(url, user, password);
            String sql = "SELECT * FROM user3 WHERE id = ?";
            pstmt = conn.prepareStatement(sql);
            pstmt.setInt(1, 1);
            rs = pstmt.executeQuery();

            while(rs.next()) {
                int id = rs.getInt("id");
                String name = rs.getString("name");
                String pass = rs.getString("pass");
                System.out.println("ID: " + id + ", Name: " + name + ", Email: " + pass);
            }
        } catch (ClassNotFoundException var31) {
            ClassNotFoundException e = var31;
            e.printStackTrace();
        } catch (SQLException var32) {
            SQLException e = var32;
            e.printStackTrace();
        } finally {
            SQLException e;
            if (rs != null) {
                try {
                    rs.close();
                } catch (SQLException var30) {
                    e = var30;
                    e.printStackTrace();
                }
            }

            if (pstmt != null) {
                try {
                    pstmt.close();
                } catch (SQLException var29) {
                    e = var29;
                    e.printStackTrace();
                }
            }

            if (conn != null) {
                try {
                    conn.close();
                } catch (SQLException var28) {
                    e = var28;
                    e.printStackTrace();
                }
            }

        }

    }
}